<template>
  <div>
    A页面
    <el-button @click="goPageB">跳转至B页面</el-button>
    <router-view></router-view>
  </div>
</template>
<script>
export default {
  methods: {
    goPageB() {
      this.$router.push({
        name: "pageB",
        query: {
          id: "2",
        },
      });
    },
  },
};
</script>
